@echo off
set dateTime=%date:~0,4%%date:~5,2%%date:~8,2%
set nowVersion=1.0.%dateTime%
set project_path=%~dp0

echo project path is %project_path%

git -C %project_path% pull

sed -ri "s/<version>1\.0\.[0-9]{8}<\/version>/<version>%nowVersion%<\/version>/" %project_path%\league-facade\pom.xml
sed -ri "s/<version>1\.0\.[0-9]{8}<\/version>/<version>%nowVersion%<\/version>/" %project_path%\league-biz\pom.xml
del %project_path%\sed*

git -C %project_path%\${artifactId}-facade add pom.xml
git -C %project_path%\${artifactId}-biz add pom.xml
git -C %project_path% commit -m "update version to "%nowVersion%
git -C %project_path% push
echo.

call mvn clean deploy:deploy-file -U -DgroupId=${groupId} -DartifactId=${artifactId} -Dversion=1.0 -Dpackaging=pom -Dfile=pom.xml -Durl=http://192.168.100.59:10011/repository/maven-releases/ -DrepositoryId=releases
call mvn clean deploy -Pdev -f %project_path%\${artifactId}-facade\pom.xml

pause